package com.mfc.education.service.ucenter.controller.admin;

import com.mfc.education.common.base.result.R;
import com.mfc.education.service.ucenter.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.nio.channels.MembershipKey;

/**
 * @author mfc
 * @since 2021/10/5
 */
@Api(description = "会员管理")
@RestController
@RequestMapping("/admin/ucenter/member")
@Slf4j
public class MemberController {

    @Autowired
    private MemberService memberService;


    @ApiOperation("会员注册数")
    @GetMapping("count-register-num")
    public R countRegisterNum(@RequestParam("day") String day){

        Integer registerNum = memberService.countRegisterNum(day);


        return R.ok().data("registerNum",registerNum);
    }
}
